package com.sst.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sst.sys.entity.SuccessDto;
import com.sst.sys.entity.User;
import com.sst.sys.mapper.UserMapper;
import com.sst.sys.service.IUserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements IUserService {

    @Override
    public SuccessDto checkPassword(User user) {
        SuccessDto dto = new SuccessDto();
        int result = baseMapper.checkPassword(user);
        if(result<0){
            dto.setCode("000000");
            dto.setMessage("error");
            return dto;
        }
        dto.setCode("000001");
        dto.setMessage("success");
        return dto;
    }
}
